

import getModifyData from '../../request-functions/getModifyData';

export default async function (callback, pk_psnjob) {

    const {
        humanResourceOrganizationValue: {
            refpk
        },
        selectedRows,
    } = this.state;

    let postData = {
        func_type: '1',
        pk_org: refpk,
        pk_psnjob: pk_psnjob ? pk_psnjob : selectedRows[0].data.values['pk_psnjob'].value
    };

    try {
        let res = await getModifyData(postData, 'modify');

        if(res.success) {
            callback && callback.call(this);
        }
    }
    catch(e) {
    }
}